<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>管理员查询用户</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 引入 Bootstrap -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>

<div class="container">

    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>用户</small>
                </h1>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-md-4 column">
            <a class="btn btn-primary" href="/admiQueryUser">显示全部用户</a>
        </div>
        <div class="col-md-4 column"></div>
        <div class="col-md-4 column">
            <form action="/toAdmiIndexPage" method="post" style="float: right">
                <input type="submit" value="返回上一页" class="btn btn-primary">
            </form>
        </div>
    </div>

    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>用户ID</th>
                    <th>用户名字</th>
                    <th>密码</th>
                    <th>联系方式</th>
                    <th>是否为管理员</th>
                </tr>
                </thead>

                <tbody>
                <h4 th:each="user,State:${List}">
                    <tr>
                        <td th:text="${user.userid}"></td>
                        <td th:text="${user.username}"></td>
                        <td th:text="${user.password}"></td>
                        <td th:text="${user.phone}"></td>
                        <td th:text="${user.administrator}"></td>
                        <td>
                            <a th:href="@{/toAdmiUpdateUserPage/{userid}(userid=${user.userid})}">更改</a> |
                            <a th:href="@{/admiDeleteUser/{userid}(userid=${user.userid})}">删除</a>
                        </td>
                    </tr>
                </h4>

                </tbody>
            </table>
        </div>
    </div>
</div>